<div style="padding:30px;" class="layui-form layui-form-pane">
    <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
    <input type="hidden" name="id" value="{$typeInfo.id}">

    <div class="layui-form-item">
        <label class="layui-form-label"><i class="required-color">*</i>分类名称：</label>
        <div class="layui-input-block">
            <input type="text" name="type_name" required lay-verify="required" placeholder="请输入名称" value="{$typeInfo.type_name}" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><i class="required-color">*</i>选择编码：</label>
        <div class="layui-input-block">
            <select name="codes" lay-filter="codes">
                        <option value="">请选择编码</option>
                        {foreach $codeList as $key=>$vo }
                        <option value="{$key}" {eq name="$typeInfo.codes" value="$key"}selected{/eq}>{$vo}</option>
                        {/foreach}
                </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><i class="required-color">*</i>排序：</label>
        <div class="layui-input-block">
            <input type="text" name="sort" required lay-verify="required" placeholder="请输入排序" autocomplete="off" class="layui-input" value="{$typeInfo.sort}">
        </div>
    </div>

    <button class="layui-btn layui-btn-fluid add-save-btn" lay-submit lay-filter="edit_article_type">保存</button>
    <!-- 更多表单结构排版请移步文档左侧【页面元素-表单】一项阅览 -->
</div>
<script>
    layui.use('form', function() {
        layui.form.render();
        //各种基于事件的操作，下面会有进一步介绍
    });
</script>